<template>
	<view class="container">
		<u-table v-if="courseList.length">
		    <u-tr>
		    	<u-th>课程名称</u-th>
		    	<u-th>课程时段</u-th>
		    	<u-th>课程说明</u-th>
		    	<u-th>课程价格</u-th>
		    </u-tr>
		    <u-tr v-for="(item, index) in courseList" :key="index">
		    	<u-td>{{item.name}}</u-td>
		    	<u-td>{{item.classTime}}</u-td>
		    	<u-td>{{item.classExpert}}</u-td>
		    	<u-td>{{item.classPrice ? `${item.classPrice}元` : '-' }}</u-td>
		    </u-tr>
	    </u-table>

        <u-toast ref="uToast" />
	</view>
</template>

<script>
    import Vue from 'vue';

    const app = getApp()
	export default Vue.extend({
		data() {
			return {
                courseList: []
			}
		},
		onLoad(options) {
            console.log(options)
            if(options.bizInfo && JSON.parse(options.bizInfo).courseList && JSON.parse(options.bizInfo).courseList.length) {
                this.courseList = JSON.parse(options.bizInfo).courseList
                console.log(this.courseList)
            }
		},
		methods: {
            
		} 
	});
</script>

<style lang="scss" scoped>
@import '../../assets/scss/common.scss';

.container{
    padding: 30rpx;
  
}
</style>
